package cn.yitun.chat.yitunservermaincoresingle.main.business.user.store;

import cn.yitun.chat.yitunservercommonlib.dataentity.vo.system.user.UserVo;
import cn.yitun.chat.yitunserverimcore.bridge.main.business.user.store.UserStore;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;

/**
 * Date 2019-02-10 21:05:36<br>
 * Description
 * 
 * @author yitun
 * @since 1.0.0
 */
@Component
public class UserStoreImpl implements UserStore {

	private Map<Long, String> userStatusMap = new ConcurrentSkipListMap<>();

	@Override
	public void put(UserVo userData) {
		// TODO Auto-generated method stub
	}

	@Override
	public UserVo get(Long userId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void putStatus(Long userId, String status) {
		status = null == status ? "1" : status;
		userStatusMap.put(userId, status);
	}

	@Override
	public String getStatus(Long userId) {
		return userStatusMap.get(userId);
	}
}
